#!/bin/bash

cd /root
git clone https://gitee.com/AmazingBian/opencv_contrib.git
git clone https://gitee.com/AmazingBian/opencv.git
cd opencv
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local/opencv/ -D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib/modules  ..
make -j$nproc
make install
